package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ChapterApplyMapper;
import com.ruoyi.domain.ChapterApply;
import com.ruoyi.service.IChapterApplyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用章申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-22
 */
@Service
public class ChapterApplyServiceImpl implements IChapterApplyService 
{
    @Autowired
    private ChapterApplyMapper chapterApplyMapper;

    /**
     * 查询用章申请
     * 
     * @param cId 用章申请ID
     * @return 用章申请
     */
    @Override
    public ChapterApply selectChapterApplyById(Long cId)
    {
        return chapterApplyMapper.selectChapterApplyById(cId);
    }

    /**
     * 查询用章申请列表
     * 
     * @param chapterApply 用章申请
     * @return 用章申请
     */
    @Override
    public List<ChapterApply> selectChapterApplyList(ChapterApply chapterApply)
    {
        return chapterApplyMapper.selectChapterApplyList(chapterApply);
    }

    /**
     * 新增用章申请
     * 
     * @param chapterApply 用章申请
     * @return 结果
     */
    @Override
    public int insertChapterApply(ChapterApply chapterApply)
    {
        return chapterApplyMapper.insertChapterApply(chapterApply);
    }

    /**
     * 修改用章申请
     * 
     * @param chapterApply 用章申请
     * @return 结果
     */
    @Override
    public int updateChapterApply(ChapterApply chapterApply)
    {
        return chapterApplyMapper.updateChapterApply(chapterApply);
    }

    /**
     * 删除用章申请对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteChapterApplyByIds(String ids)
    {
        return chapterApplyMapper.deleteChapterApplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用章申请信息
     * 
     * @param cId 用章申请ID
     * @return 结果
     */
    @Override
    public int deleteChapterApplyById(Long cId)
    {
        return chapterApplyMapper.deleteChapterApplyById(cId);
    }

    @Override
    public int submitExaStatus(Long cId) {

        return chapterApplyMapper.submitExaStatus(cId);
    }

    @Override
    public int revoExaStatus(Long cId) {
        return chapterApplyMapper.revoExaStatus(cId);
    }

    @Override
    public int overExaStatus(Long cId) {
        return chapterApplyMapper.overExaStatus(cId);
    }

    @Override
    public int conExaStatus(Long cId) {
        return chapterApplyMapper.conExaStatus(cId);
    }

    @Override
    public int editparoStatus(Long cId) {
        return chapterApplyMapper.editparoStatus(cId);
    }
}
